package projet.example.labyrinthe;
import simple.example.labyrinthe.Bille;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.RectF;

public class Obstacle extends RectF
{
	Bitmap sprite;
	
	public Obstacle() 
	{
		super();
	}

	public Obstacle(int x, int y,int largeur,int hauteur, Resources res, int idSprite) 
	{
		super(x, y, x+largeur, y+hauteur);
		sprite = BitmapFactory.decodeResource(res, idSprite);
	}

	public int getX() 
	{
		return (int) this.left;
	}
	
	public void setX(int x) 
	{
		this.left=x;
	}
	
	public int getY() 
	{
		return (int) this.top;
	}
	
	public void setY(int y) 
	{
		this.top =y;
	}
	
	public int getLargeur() 
	{
		return (int)this.width();
	}
	
	
	public int getHauteur() 
	{
		return (int) this.height();
	}
	
	
	public void Draw(Canvas canvas)
	{
		canvas.drawBitmap(sprite,getX(),getY(), null);
	}
	
}
